{literal}	
	<script type="text/javascript" charset="utf-8">
		var tempScrollTop, currentScrollTop = 0,s=1;
		$("#center_column").scroll(function(){
			currentScrollTop = $("#center_column").scrollTop()+440;
			scrollY = document.getElementById('center_column').scrollHeight;
			if (scrollY==currentScrollTop) {
				s=s+1;
				appendAjaxStatus();
			}
		});
		function appendAjaxStatus(){
			$.ajax({
				type: 'GET',
				url: baseDir + 'modules/zgallery/zgallery-ajax.php',
				async: true,
				data: 'scroll='+s+'&id_ct={$id_ct}&id_item={$id_item}',
				success: function(data) {
					$("#choAjax").remove();
					if (data!='false') {
						$('#center_column').append (data);
					}
				},
				error: function(XMLHttpRequest, textStatus, errorThrown) {alert("TECHNICAL ERROR: unable to save delete comment \n\nDetails:\nError thrown: " + XMLHttpRequest + "\n" + 'Text status: ' + textStatus);}
			});
		};
	</script>
{/literal}
{if sizeof($albums)!=0} 
	{foreach from=$albums item=album}
		<div class="album-block clearfix">
			<a alt="{$album.description}" href="{$album.link}">
				<img src="{$album.linkImage}" class="img">
			</a>
			<div class="album-details">
				<a alt="{$album.description}" href="{$album.link}">
					<h5 class="album-title">{$album.name}</h5>
				</a>
				<p>{$album.description|truncate:240}</p>
				<div class="album-des clearfix">
					<span class="album-author">Bởi {$album.author|truncate:27}</span>
					<span class="album-time">{$album.date_add}</span>
					<span class="album-view">{$album.nb_view} lượt xem</span>
					<span class="album-view">{$album.nb_like} lượt like</span>
				</div>
			</div>
		</div>
	{/foreach}
{else}
	<p class="itemNF">Not found items</p>
{/if}
{if $nb>sizeof($albums)}
	<div class="choAjax" id="choAjax"><img src="{$path}loader.gif"></div>
{/if}
<div id="templateCategory" style="display:none;">
	<div class="zgallery_list_album_priority">
		{if sizeof($albumsPrp)!=0} 
			{foreach from=$albumsPrp item=album}
				<div class="album-block clearfix">
					<a alt="{$album.description}" href="{$album.link}">
						<img src="{$album.linkImage}" class="img">
					</a>
					<div class="album-details">
						<a alt="{$album.description}" href="{$album.link}">
							<h5 class="album-title">{$album.name|truncate:15}</h5>
						</a>
						<p>{$album.description|truncate:45}</p>
						<div class="album-des clearfix">
							<span class="album-view">{$album.nb_view} lượt xem</span>
						</div>
					</div>
				</div>
			{/foreach}
		{else}
			<p class="itemNF">Not found items priority</p>
		{/if}
	</div>
</div>
